home *** CD-ROM | disk | FTP | other *** search
/ ETO Development Tools 4 / ETO Development Tools 4.iso / Essentials / MacApp Documentation / MacApp.TECH$ Archives / 1991 / Jan 91 / MacApp.Tech$ 1⁄18⁄91 / 2734-Re[2] Modula-2 refer-Jan91 < prev    next >
Encoding:
Text File  |  1991-03-06  |  2.2 KB  |  42 lines  |  [TEXT/GEOL]

  1. Item    9372308                         18-Jan-91        12:41PST
  2.  
  3. From:   MERRITT                         Merritt, Jim
  4.  
  5. To:     BROSNAHAN.R                     Richard Brosnahan,GEIS
  6.  
  7. cc:     MACAPP.TECH$                    MacApp Technical
  8.  
  9. ------------------------------------------------------------------------------
  10.  
  11. Sub:    Re: Re: Modula-2 reference
  12.  
  13. The p1 Modula-2 compiler mentioned earlier has worked well for me under MPW (I
  14. use it to make MPW tools, mostly).  There are other MPW and/or Mac
  15. implementations, I believe, but I am not familiar with any other,
  16. currently-supported  MPW-based M2 compiler.  I acquired p1 M2 through the
  17. MacApp Developers' Association.
  18.  
  19. By the way, I'd like to correct myself on something I implied earlier about
  20. Modula-2's descendant, Oberon.  Actually, Oberon doesn't support "inheritance"
  21. in the classic OOP sense.  It does support data-type extension, in that you can
  22. define a record data-type B by specifying it as "the same as A with some
  23. additional fields."  I like to think of that as being part of inheritance, but
  24. "true" inheritance -- the passing on of methods as well as structures in the
  25. DEFINITION of a type/class -- is not provided by Oberon.  Instead, Oberon
  26. adopts Modula-2's notion of a procedure variable, and lets you define any
  27. record to include procedure variables as fields.  When you initialize an
  28. instance of such a record at runtime, you must explicitly bind each procedure
  29. variable with a procedure (i.e., a method).  This causes a little busy work for
  30. OOP programmers used to automatic inheritance, but it also eliminates the need
  31. to have facilities for "overriding" inheritance, among other benefits.  Sadly,
  32. Modula-2 does not have Oberon's elegant type-extension facility (though it does
  33. have rich data structuring facilities by the standards of those used to
  34. Pascal-type languages), and Oberon does not have enumerated types or type
  35. subranges, which I have found so useful in both Pascal and Modula-2.  Each
  36. language offers a slightly different, though overlapping grab bag of tools, to
  37. my great frustration, as both are very attractive to me, and I would like to
  38. settle on one or the other to simplify my programming life!  ;)
  39.  
  40. -Jim Merritt, Apple Computer, Inc.
  41.  
  42.